<!-- search area   -->
<div class="row searchLineWrap">
	<form class="form-horizontal" method="post" action="${cxt!}/message/emailMessage/list" id="searchForm">
		<div class="col-md-12">
			<div class="row">
				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["emailMessage.emailTitle"]}</label>
						<div class="col-md-7">
								<input type="text" class="form-control" name="emailMessage.l_title" placeholder="${_res['emailMessage.emailTitle']}" value="${paramMap['emailMessage.l_title']}" />
						</div>
					</div>
				</div>

				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["emailMessage.sendTime"]}</label>
						<div class="col-md-7">
								<input placeholder="${_res['emailMessage.sendTime']}" class="form-control layer-date laydate-icon" onclick="laydate()" name="emailMessage.gt_createtime" value="${paramMap['emailMessage.gt_createtime']}">
						</div>
					</div>
				</div>

				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-4 control-label">${_res["emailMessage.endTime"]}</label>
						<div class="col-md-7">
								<input placeholder="${_res['emailMessage.endTime']}" class="form-control layer-date laydate-icon" onclick="laydate()" name="emailMessage.le_createtime" value="${paramMap['emailMessage.le_createtime']}">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["emailMessage.sendObject"]}</label>
						<div class="col-md-7">
							<#dict type="select" name="emailMessage.f_sendobject" table="customer_role" filedName="name" filedValue="id" value="${paramMap['emailMessage.f_sendobject']}"/>
						</div>
					</div>
				</div>

				<div class="col-md-4">
					<div class="form-group">
						<label class="col-md-5 control-label">${_res["emailMessage.sendStatus"]}</label>
						<div class="col-md-7">
								<#dict type="select" name="emailMessage.f_status" dictCode="SEND_STATUS" value="${paramMap['emailMessage.f_status']}"/>
						</div>
					</div>
				</div>
				<div class="col-md-2">
					<div class="form-group">
						<% if(hasPrivilegeUrl("emailList")){ %>
						<button type="button" class="btn btn-primary pull-right" onclick="ajaxForm('content','searchForm')">
							<i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}
						</button>
						<% } %>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
<!-- search area end  -->

<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("emailAdd")){ %>
		<p>
			<a href="javascript:void(0);" onClick="ajaxContent('/message/emailMessage/add/a');" class="btn btn-primary pull-left">${_res["emailMessage.add"]}</a>
			<div class="clearfix"></div>
		</p>
	<% } %>
	<table class="table table-bordered">
		<thead>
			<tr>
				<th>${_res["emailMessage.emailTitle"]}</th>
				<th>${_res["emailMessage.contentDescription"]}</th>
				<th>${_res["emailMessage.sendObject"]}</th>
				<th>${_res["emailMessage.sendStatus"]}</th>
				<th>${_res["emailMessage.sendTime"]}</th>
				<th>${_res["system.operator"]}</th>
			</tr>
		</thead>
		<tbody>
			<% for(item in splitPage.list!){ %>
			<tr >
				<td>${item.title!}</td>
				<td>${item.content!}</td>
				<td width="300px !important"><#dict type="lable" value="${item.sendobject!}" table="customer_role" filedName="name" filedValue="id" /></td>
				<td><#dict type="lable" value='${item.status!}' dictCode="SEND_STATUS"/></td>
				<td>${item.sendtime!,dateFormat="yyyy-MM-dd HH:mm"}</td>
				<td>
					<% if(hasPrivilegeUrl("emailView")){ %>
					<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/message/emailMessage/view/${item.id!}');">${_res["system.view"]}</button>
					<% } %> 
					<% if(hasPrivilegeUrl("emailEdit")){ %>
					<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/message/emailMessage/update/e-${item.id!}')">${_res["system.edit"]}</button>
					<% } %> 
					<% if(hasPrivilegeUrl("emailDelete")){ %>
					<button type="button" class="btn btn-sm btn-link" onClick="ajaxDelete('/message/emailMessage/delete/${item.id!}')">${_res["system.delete"]}</button>
					<% } %>
				</td>
			</tr>
			<% } %>
		</tbody>
	</table>
	<div id="splitPageDiv"><#page formId="searchForm" /></div>
	<#nav />
</div>